﻿using UnityEngine;
using UnityEngine.UI;
#if UNITY_IPHONE
using System.Runtime.InteropServices;
#endif
public class AlbumCamera : MonoBehaviour {

	public Button albumButton;
	//public Button cameraButton;

	public static void CallAlbum()
	{
		#if UNITY_IPHONE
		_iosAlbum();
		#endif
	}

	#if UNITY_IPHONE

	[DllImport("__Internal")]
	private static extern void _iosCamera();
	[DllImport("__Internal")]
	private static extern void _iosAlbum();

	void Awake()
	{
		//cameraButton.onClick.AddListener(_iosCamera);
		albumButton.onClick.AddListener(_iosAlbum);
	}

	void getImage(string path)
	{
		Debug.Log(path);
		if (path != "") {
			//set start invisible

			//show recog
			//TFTest.instance.talkImpl (path);

			PanelControler.instance.albumImageReturned (path, 500,500);
		}
	}
	#endif
}

